﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Cabal.Kernel.Cryptilogy
{
    public interface ICryptProvider
    {
        /// <summary>
        /// 获取加密类的Cabal唯一识别名称
        /// </summary>
        string GetName();
        /// <summary>
        /// 解密数据(异常:密钥长度限制)
        /// </summary>
        byte[] DecryptData(byte[] c);
        /// <summary>
        /// 加密数据(异常:密钥长度限制)
        /// </summary>
        byte[] EncryptData(byte[] m);
        /// <summary>
        /// 由BASE64编码解密为字符串
        /// </summary>
        string DecryptStringBase64(string c);
        /// <summary>
        /// 由字符串加密为BASE64编码
        /// </summary>
        string EncryptStringBase64(string m);
    }
}
